from abc import ABC, abstractmethod
from fastapi import Depends, Request

from .auth_perm import ISystemAuthPermService, SystemAuthPermService

class ISystemAuthRoleService(ABC):
    pass


class SystemAuthRoleService(ISystemAuthRoleService):

    def __init__(self, auth_perm_service: ISystemAuthPermService):
        self.auth_perm_service: ISystemAuthPermService = auth_perm_service

    @classmethod
    async def instance(cls, auth_perm_service: ISystemAuthPermService = Depends(SystemAuthPermService.instance)):
        """实例化"""
        return cls(auth_perm_service)
